<template>
    <!-- 修改资料 -->

    <div>
        <!-- 内容主题区域 -->
        <el-form label-width="85px" :model="form" label-position="right" ref="formRef" :rules="formRules" disabled
            class="borderNone">
            <el-form-item label="编号" prop="number">
                <el-input v-model="form.number"></el-input>
            </el-form-item>
            <el-form-item label="名称" prop="name">
                <el-input v-model="form.name"></el-input>
            </el-form-item>
            <el-form-item label="上级类别" prop="parentId">
                <el-input v-model="form.parentName" />
            </el-form-item>
            <el-form-item label="分类" prop="categoryName">
                <el-input v-model="form.categoryName" />
            </el-form-item>
            <el-form-item label="状态" prop="status">
                <el-switch v-model="form.status" size="large" inline-prompt :active-icon="Check" :inactive-icon="Close"
                    active-value="normal" inactive-value="disable" />
            </el-form-item>
            <el-form-item label="备注">
                <el-input v-model="form.remark"></el-input>
            </el-form-item>

        </el-form>
        <!-- 底部按钮区域 -->
        <div class="button-position">
            <el-button @click="updateVisible" type="primary">退 出</el-button>
        </div>
    </div>
</template>

<script setup>
import { ref, onMounted } from 'vue';
import { Check, Close } from '@element-plus/icons-vue';
import Api from '@/api/model/system'
const emit = defineEmits(['updatetable'])
const props = defineProps({
    paramsData: {
        type: Object,
        defalut: {}
    }
})

onMounted(() => {
    getData()

})
// 查看用户数据的对象
const form = ref({});

const updateVisible = () => {
    emit('updatetable')
}

//调取数据
const getData = async () => {
    console.log(props.paramsData)
    let res = await Api.codekind.detail.post(props.paramsData);
    if (res.code == 200) {
        form.value = res.data;
    } else {
        form.value = '';
    }

}


</script>

<style lang="less" scoped>
.borderNone {
    :deep(.el-input__wrapper) {
        box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
        cursor: default;
        background-color: transparent; //背景颜色透明
        border-bottom: 1px solid #999;
        border-radius: 0;

        .el-input__inner {
            cursor: default !important;
        }
    }
}
</style>

